package com.liuxing.strategy;

/**
 * @ClassName StrategyTest
 * @Description 测试
 * @Author ymy
 * @Date 2021/5/21 15:08
 */
public class StrategyTest {

    public static void main(String[] args) {
        //国外
        IStrategy strategy1 = StrategyFactory.getStrategy1(1);
        Context context1 = new Context(strategy1);
        String tool1 = context1.strategyTravel();
        System.out.println( tool1);
        //国内--省外
        IStrategy strategy2 = StrategyFactory.getStrategy1(2);
        Context context2 = new Context(strategy2);
        String tool2 = context2.strategyTravel();
        System.out.println(tool2);
        //国内--省内
        IStrategy strategy3 = StrategyFactory.getStrategy1(3);
        Context context3 = new Context(strategy3);
        String tool3 = context3.strategyTravel();
        System.out.println(tool3);
    }
}
